package org.zn.plus.mybatis.sql.builder.data.adapter;

import java.util.ArrayList;

import org.zn.commons.tree.TreeNode;

public class AdapterMappingNode extends TreeNode<String>{
	
	private String id;
	private String nodeName;
	private String model;
	private String type;
	private String column;
	private AdapterMappingNode ref;
	
	
	public void addChild(AdapterMappingNode node) {
		
		if(childrenNodes==null) childrenNodes=new ArrayList<>();
		
		this.childrenNodes.add(node);
		
	}

	
	public String getColumn() {
		return column;
	}
	public void setColumn(String column) {
		this.column = column;
	}
	public AdapterMappingNode getRef() {
		return ref;
	}
	public void setRef(AdapterMappingNode ref) {
		this.ref = ref;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getNodeName() {
		return nodeName;
	}
	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Override
	public String getNid() {
		// TODO Auto-generated method stub
		return this.id;
	}
	@Override
	public void setNid(String nid) {
		// TODO Auto-generated method stub
		this.id=nid;
	}
	@Override
	public String getPid() {
		// TODO Auto-generated method stub
		return super.getParentNode().getPid();
	}
	@Override
	public void setPid(String pid) {
		// TODO Auto-generated method stub
		
	}

}
